package pestañas;

import com.lowagie.text.Cell;
import com.lowagie.text.Chunk;
import java.io.FileOutputStream;
import javax.swing.JProgressBar;
import javax.swing.JTextField;
import vistas.VistaPrincipal;
import com.lowagie.text.Document;
import com.lowagie.text.Element;
import com.lowagie.text.Font;
import com.lowagie.text.Image;
import com.lowagie.text.Paragraph;
import com.lowagie.text.Phrase;
import com.lowagie.text.Table;
import com.lowagie.text.pdf.BaseFont;
import com.lowagie.text.pdf.PdfPCell;
import com.lowagie.text.pdf.PdfPTable;
import com.lowagie.text.pdf.PdfWriter;
import java.awt.Color;
import java.awt.Desktop;
import java.io.File;
import javax.swing.JOptionPane;
import net.java.balloontip.BalloonTip;
import net.java.balloontip.styles.MinimalBalloonStyle;
import net.java.balloontip.utils.TimingUtils;
import utilidades.ValidaDecimal;
import utilidades.ValoresMetodologiaEstimacion;

/**
 *
 * @author Shidobu
 */
public class PanelPaso4 extends javax.swing.JPanel {

	VistaPrincipal vista;
	String fechaInicio;
	String fechaTermino;
    String numeroDesarroll;
    String numeroEvaluadores;
    String horasSoftware;
    String tamSoftware;
    String otrasConsideraciones1;
    String UCE;
    String UNCE;
    String UEX;
	boolean planillaLista = false;

	/** Creates new form PanelPaso4 */
	public PanelPaso4 () {
		initComponents ();
		jPanelCostoEvaluacion.setVisible (false);
		jPanelCostoReparacion.setVisible (false);
	}

	public void setVista (VistaPrincipal vista) {
		this.vista = vista;
		this.fechaInicio = (String) jCalendarComboFechaInicio.getSelectedItem ();
		this.fechaTermino = (String) jCalendarComboFechaTermino.getSelectedItem ();
	}

	//Métodos para ABRIR y para LIMPIAR
	public void setEvaluadorExpertoValorHH (String valor) {
		this.jTextFieldEvaluadorExpertoValorHH.setText (valor);
	}

	public void setEvaluadorExpertoHorasEvaluacion (String valor) {
		this.jTextFieldEvaluadorExpertoHorasEvaluacion.setText (valor);
	}

	public void setUsuarioEvaluadorValorHH (String valor) {
		this.jTextFieldUsuarioEvaluadorValorHH.setText (valor);
	}

	public void setUsuarioEvaluadorHorasEvaluacion (String valor) {
		this.jTextFieldUsuarioEvaluadorHorasEvaluacion.setText (valor);
	}

	public void setValorOtrosCostos (String valor) {
		this.jTextFieldValorOtrosCostos.setText (valor);
	}

	public void setTotalCostoEvaluacionPesos (String valor) {
		this.jTextFieldTotalCostoEvaluacionPesos.setText (valor);
	}

	public void setTotalCostoEvaluacionUF (String valor) {
		this.jTextFieldTotalCostoEvaluacionUF.setText (valor);
	}

	public void setDesarrolladorValorHH (String valor) {
		this.jTextFieldDesarrolladorValorHH.setText (valor);
	}

	public void setDesarrolladorHorasReparacion (String valor) {
		this.jTextFieldDesarrolladorHorasReparacion.setText (valor);
	}

	public void setTotalCostoReparacionPesos (String valor) {
		this.jTextFieldTotalCostoReparacionPesos.setText (valor);
	}

	public void setTotalCostoReparacionUF (String valor) {
		this.jTextFieldTotalCostoReparacionUF.setText (valor);
	}

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	@SuppressWarnings ("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanelFechas = new javax.swing.JPanel();
        jLabelFechaInicio = new javax.swing.JLabel();
        jLabelFechaTermino = new javax.swing.JLabel();
        jCalendarComboFechaInicio = new org.freixas.jcalendar.JCalendarCombo();
        jCalendarComboFechaTermino = new org.freixas.jcalendar.JCalendarCombo();
        jButtonMostrarCampos = new javax.swing.JButton();
        jPanelCostoEvaluacion = new javax.swing.JPanel();
        jPanelUsuarioEvaluador = new javax.swing.JPanel();
        jLabelUsuarioEvaluadorValorHH = new javax.swing.JLabel();
        jLabelUsuarioEvaluadorHorasEvaluacion = new javax.swing.JLabel();
        jTextFieldUsuarioEvaluadorValorHH = new javax.swing.JTextField();
        jTextFieldUsuarioEvaluadorHorasEvaluacion = new javax.swing.JTextField();
        jPanelOtrosCostos = new javax.swing.JPanel();
        jLabelValorOtrosCostos = new javax.swing.JLabel();
        jTextFieldValorOtrosCostos = new javax.swing.JTextField();
        jPanelTotalCostoEvaluacion = new javax.swing.JPanel();
        jLabelTotalCostoEvaluacionPesos = new javax.swing.JLabel();
        jLabelTotalCostoEvaluacionUF = new javax.swing.JLabel();
        jTextFieldTotalCostoEvaluacionPesos = new javax.swing.JTextField();
        jTextFieldTotalCostoEvaluacionUF = new javax.swing.JTextField();
        jPanelEvaluadorExperto = new javax.swing.JPanel();
        jLabelEvaluadorExpertoValorHH = new javax.swing.JLabel();
        jLabelEvaluadorExpertoHorasEvaluacion = new javax.swing.JLabel();
        jTextFieldEvaluadorExpertoHorasEvaluacion = new javax.swing.JTextField();
        jTextFieldEvaluadorExpertoValorHH = new javax.swing.JTextField();
        jPanelCostoReparacion = new javax.swing.JPanel();
        jPanelReparacionDesarrollador = new javax.swing.JPanel();
        jLabelReparacionDesarrolladorValorHH = new javax.swing.JLabel();
        jLabelReparacionDesarrolladorHorasReparacion = new javax.swing.JLabel();
        jTextFieldDesarrolladorValorHH = new javax.swing.JTextField();
        jTextFieldDesarrolladorHorasReparacion = new javax.swing.JTextField();
        jPanelTotalCostoReparacion = new javax.swing.JPanel();
        jTextFieldTotalCostoReparacionPesos = new javax.swing.JTextField();
        jLabelTotalCostoEvaluacionPesos1 = new javax.swing.JLabel();
        jLabelTotalCostoEvaluacionUF1 = new javax.swing.JLabel();
        jTextFieldTotalCostoReparacionUF = new javax.swing.JTextField();
        jButtonReporte = new javax.swing.JButton();

        setMaximumSize(new java.awt.Dimension(595, 540));
        setMinimumSize(new java.awt.Dimension(595, 540));
        setPreferredSize(new java.awt.Dimension(595, 540));

        jPanelFechas.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanelFechas.setMaximumSize(new java.awt.Dimension(575, 77));
        jPanelFechas.setMinimumSize(new java.awt.Dimension(575, 77));
        jPanelFechas.setPreferredSize(new java.awt.Dimension(575, 77));

        jLabelFechaInicio.setFont(new java.awt.Font("Tahoma 11 Negrita 12 Simple", 1, 12));
        jLabelFechaInicio.setText("Fecha Inicio:");

        jLabelFechaTermino.setFont(new java.awt.Font("Tahoma 11 Negrita 12 Simple", 1, 12));
        jLabelFechaTermino.setText("Fecha Término:");

        jCalendarComboFechaInicio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCalendarComboFechaInicioActionPerformed(evt);
            }
        });

        jCalendarComboFechaTermino.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jCalendarComboFechaTerminoActionPerformed(evt);
            }
        });

        jButtonMostrarCampos.setText("Mostrar todos los campos");
        jButtonMostrarCampos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonMostrarCamposActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelFechasLayout = new javax.swing.GroupLayout(jPanelFechas);
        jPanelFechas.setLayout(jPanelFechasLayout);
        jPanelFechasLayout.setHorizontalGroup(
            jPanelFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelFechasLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelFechaTermino)
                    .addComponent(jLabelFechaInicio))
                .addGap(18, 18, 18)
                .addGroup(jPanelFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jCalendarComboFechaTermino, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jCalendarComboFechaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(51, 51, 51)
                .addComponent(jButtonMostrarCampos, javax.swing.GroupLayout.PREFERRED_SIZE, 177, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(61, 61, 61))
        );
        jPanelFechasLayout.setVerticalGroup(
            jPanelFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelFechasLayout.createSequentialGroup()
                .addGroup(jPanelFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelFechasLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanelFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelFechaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jCalendarComboFechaInicio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanelFechasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabelFechaTermino)
                            .addComponent(jCalendarComboFechaTermino, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanelFechasLayout.createSequentialGroup()
                        .addGap(22, 22, 22)
                        .addComponent(jButtonMostrarCampos)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelCostoEvaluacion.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Costo Evaluación", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12), null)); // NOI18N
        jPanelCostoEvaluacion.setMaximumSize(new java.awt.Dimension(575, 209));
        jPanelCostoEvaluacion.setMinimumSize(new java.awt.Dimension(575, 209));

        jPanelUsuarioEvaluador.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Usuario Evaluador", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), null)); // NOI18N
        jPanelUsuarioEvaluador.setMaximumSize(new java.awt.Dimension(268, 88));
        jPanelUsuarioEvaluador.setMinimumSize(new java.awt.Dimension(268, 88));
        jPanelUsuarioEvaluador.setPreferredSize(new java.awt.Dimension(268, 88));

        jLabelUsuarioEvaluadorValorHH.setText("Valor HH:");

        jLabelUsuarioEvaluadorHorasEvaluacion.setText("Horas de Evaluación:");

        jTextFieldUsuarioEvaluadorValorHH.setEnabled(false);
        jTextFieldUsuarioEvaluadorValorHH.setMaximumSize(new java.awt.Dimension(100, 20));
        jTextFieldUsuarioEvaluadorValorHH.setMinimumSize(new java.awt.Dimension(100, 20));
        jTextFieldUsuarioEvaluadorValorHH.setPreferredSize(new java.awt.Dimension(100, 20));

        jTextFieldUsuarioEvaluadorHorasEvaluacion.setEnabled(false);
        jTextFieldUsuarioEvaluadorHorasEvaluacion.setMaximumSize(new java.awt.Dimension(100, 20));
        jTextFieldUsuarioEvaluadorHorasEvaluacion.setMinimumSize(new java.awt.Dimension(100, 20));
        jTextFieldUsuarioEvaluadorHorasEvaluacion.setPreferredSize(new java.awt.Dimension(100, 20));

        javax.swing.GroupLayout jPanelUsuarioEvaluadorLayout = new javax.swing.GroupLayout(jPanelUsuarioEvaluador);
        jPanelUsuarioEvaluador.setLayout(jPanelUsuarioEvaluadorLayout);
        jPanelUsuarioEvaluadorLayout.setHorizontalGroup(
            jPanelUsuarioEvaluadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelUsuarioEvaluadorLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelUsuarioEvaluadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabelUsuarioEvaluadorValorHH, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabelUsuarioEvaluadorHorasEvaluacion, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE))
                .addGap(14, 14, 14)
                .addGroup(jPanelUsuarioEvaluadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTextFieldUsuarioEvaluadorHorasEvaluacion, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldUsuarioEvaluadorValorHH, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(22, Short.MAX_VALUE))
        );
        jPanelUsuarioEvaluadorLayout.setVerticalGroup(
            jPanelUsuarioEvaluadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelUsuarioEvaluadorLayout.createSequentialGroup()
                .addGroup(jPanelUsuarioEvaluadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelUsuarioEvaluadorValorHH)
                    .addComponent(jTextFieldUsuarioEvaluadorValorHH, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelUsuarioEvaluadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelUsuarioEvaluadorHorasEvaluacion)
                    .addComponent(jTextFieldUsuarioEvaluadorHorasEvaluacion, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        jPanelOtrosCostos.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Otros Costos"));
        jPanelOtrosCostos.setMaximumSize(new java.awt.Dimension(239, 77));
        jPanelOtrosCostos.setMinimumSize(new java.awt.Dimension(239, 77));

        jLabelValorOtrosCostos.setText("Valor de otros costos:");

        jTextFieldValorOtrosCostos.setEnabled(false);
        jTextFieldValorOtrosCostos.setMaximumSize(new java.awt.Dimension(90, 20));
        jTextFieldValorOtrosCostos.setMinimumSize(new java.awt.Dimension(90, 20));
        jTextFieldValorOtrosCostos.setPreferredSize(new java.awt.Dimension(90, 20));

        javax.swing.GroupLayout jPanelOtrosCostosLayout = new javax.swing.GroupLayout(jPanelOtrosCostos);
        jPanelOtrosCostos.setLayout(jPanelOtrosCostosLayout);
        jPanelOtrosCostosLayout.setHorizontalGroup(
            jPanelOtrosCostosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelOtrosCostosLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabelValorOtrosCostos)
                .addGap(18, 18, 18)
                .addComponent(jTextFieldValorOtrosCostos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(33, Short.MAX_VALUE))
        );
        jPanelOtrosCostosLayout.setVerticalGroup(
            jPanelOtrosCostosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelOtrosCostosLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelOtrosCostosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelValorOtrosCostos)
                    .addComponent(jTextFieldValorOtrosCostos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jPanelTotalCostoEvaluacion.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Total Costo Evaluación"));
        jPanelTotalCostoEvaluacion.setMaximumSize(new java.awt.Dimension(211, 77));
        jPanelTotalCostoEvaluacion.setMinimumSize(new java.awt.Dimension(211, 77));

        jLabelTotalCostoEvaluacionPesos.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelTotalCostoEvaluacionPesos.setText("En Pesos ($)");

        jLabelTotalCostoEvaluacionUF.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelTotalCostoEvaluacionUF.setText("En UF");

        jTextFieldTotalCostoEvaluacionPesos.setEnabled(false);
        jTextFieldTotalCostoEvaluacionPesos.setMaximumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoEvaluacionPesos.setMinimumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoEvaluacionPesos.setPreferredSize(new java.awt.Dimension(90, 20));

        jTextFieldTotalCostoEvaluacionUF.setEnabled(false);
        jTextFieldTotalCostoEvaluacionUF.setMaximumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoEvaluacionUF.setMinimumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoEvaluacionUF.setPreferredSize(new java.awt.Dimension(90, 20));

        javax.swing.GroupLayout jPanelTotalCostoEvaluacionLayout = new javax.swing.GroupLayout(jPanelTotalCostoEvaluacion);
        jPanelTotalCostoEvaluacion.setLayout(jPanelTotalCostoEvaluacionLayout);
        jPanelTotalCostoEvaluacionLayout.setHorizontalGroup(
            jPanelTotalCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTotalCostoEvaluacionLayout.createSequentialGroup()
                .addGap(35, 35, 35)
                .addGroup(jPanelTotalCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTextFieldTotalCostoEvaluacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTotalCostoEvaluacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanelTotalCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldTotalCostoEvaluacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTotalCostoEvaluacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(44, Short.MAX_VALUE))
        );
        jPanelTotalCostoEvaluacionLayout.setVerticalGroup(
            jPanelTotalCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTotalCostoEvaluacionLayout.createSequentialGroup()
                .addGroup(jPanelTotalCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanelTotalCostoEvaluacionLayout.createSequentialGroup()
                        .addComponent(jLabelTotalCostoEvaluacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jTextFieldTotalCostoEvaluacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanelTotalCostoEvaluacionLayout.createSequentialGroup()
                        .addComponent(jLabelTotalCostoEvaluacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jTextFieldTotalCostoEvaluacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap())
        );

        jPanelEvaluadorExperto.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Evaluador Experto", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), null)); // NOI18N
        jPanelEvaluadorExperto.setMaximumSize(new java.awt.Dimension(268, 88));
        jPanelEvaluadorExperto.setMinimumSize(new java.awt.Dimension(268, 88));
        jPanelEvaluadorExperto.setPreferredSize(new java.awt.Dimension(268, 88));
        jPanelEvaluadorExperto.setRequestFocusEnabled(false);

        jLabelEvaluadorExpertoValorHH.setText("Valor HH:");

        jLabelEvaluadorExpertoHorasEvaluacion.setText("Horas de Evaluación:");

        jTextFieldEvaluadorExpertoHorasEvaluacion.setEnabled(false);
        jTextFieldEvaluadorExpertoHorasEvaluacion.setMaximumSize(new java.awt.Dimension(100, 20));
        jTextFieldEvaluadorExpertoHorasEvaluacion.setMinimumSize(new java.awt.Dimension(100, 20));
        jTextFieldEvaluadorExpertoHorasEvaluacion.setPreferredSize(new java.awt.Dimension(100, 20));

        jTextFieldEvaluadorExpertoValorHH.setEnabled(false);
        jTextFieldEvaluadorExpertoValorHH.setMaximumSize(new java.awt.Dimension(100, 20));
        jTextFieldEvaluadorExpertoValorHH.setMinimumSize(new java.awt.Dimension(100, 20));
        jTextFieldEvaluadorExpertoValorHH.setPreferredSize(new java.awt.Dimension(100, 20));

        javax.swing.GroupLayout jPanelEvaluadorExpertoLayout = new javax.swing.GroupLayout(jPanelEvaluadorExperto);
        jPanelEvaluadorExperto.setLayout(jPanelEvaluadorExpertoLayout);
        jPanelEvaluadorExpertoLayout.setHorizontalGroup(
            jPanelEvaluadorExpertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelEvaluadorExpertoLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelEvaluadorExpertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabelEvaluadorExpertoValorHH, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE)
                    .addComponent(jLabelEvaluadorExpertoHorasEvaluacion, javax.swing.GroupLayout.DEFAULT_SIZE, 114, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelEvaluadorExpertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTextFieldEvaluadorExpertoHorasEvaluacion, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldEvaluadorExpertoValorHH, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(28, 28, 28))
        );
        jPanelEvaluadorExpertoLayout.setVerticalGroup(
            jPanelEvaluadorExpertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelEvaluadorExpertoLayout.createSequentialGroup()
                .addGroup(jPanelEvaluadorExpertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEvaluadorExpertoValorHH)
                    .addComponent(jTextFieldEvaluadorExpertoValorHH, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelEvaluadorExpertoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelEvaluadorExpertoHorasEvaluacion)
                    .addComponent(jTextFieldEvaluadorExpertoHorasEvaluacion, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanelCostoEvaluacionLayout = new javax.swing.GroupLayout(jPanelCostoEvaluacion);
        jPanelCostoEvaluacion.setLayout(jPanelCostoEvaluacionLayout);
        jPanelCostoEvaluacionLayout.setHorizontalGroup(
            jPanelCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCostoEvaluacionLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanelOtrosCostos, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelEvaluadorExperto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelTotalCostoEvaluacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelUsuarioEvaluador, javax.swing.GroupLayout.DEFAULT_SIZE, 269, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanelCostoEvaluacionLayout.setVerticalGroup(
            jPanelCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCostoEvaluacionLayout.createSequentialGroup()
                .addGroup(jPanelCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelEvaluadorExperto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanelUsuarioEvaluador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelCostoEvaluacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelTotalCostoEvaluacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelOtrosCostos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jPanelCostoReparacion.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Costo Reparación", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 12), null)); // NOI18N
        jPanelCostoReparacion.setMaximumSize(new java.awt.Dimension(575, 115));
        jPanelCostoReparacion.setMinimumSize(new java.awt.Dimension(575, 115));

        jPanelReparacionDesarrollador.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Desarrollador", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 0, 11), null)); // NOI18N
        jPanelReparacionDesarrollador.setMaximumSize(new java.awt.Dimension(232, 83));
        jPanelReparacionDesarrollador.setMinimumSize(new java.awt.Dimension(232, 83));

        jLabelReparacionDesarrolladorValorHH.setText("Valor HH:");

        jLabelReparacionDesarrolladorHorasReparacion.setText("Horas de Reparación:");

        jTextFieldDesarrolladorValorHH.setEnabled(false);
        jTextFieldDesarrolladorValorHH.setMaximumSize(new java.awt.Dimension(90, 20));
        jTextFieldDesarrolladorValorHH.setMinimumSize(new java.awt.Dimension(90, 20));
        jTextFieldDesarrolladorValorHH.setPreferredSize(new java.awt.Dimension(90, 20));

        jTextFieldDesarrolladorHorasReparacion.setEnabled(false);
        jTextFieldDesarrolladorHorasReparacion.setMaximumSize(new java.awt.Dimension(90, 20));
        jTextFieldDesarrolladorHorasReparacion.setMinimumSize(new java.awt.Dimension(90, 20));
        jTextFieldDesarrolladorHorasReparacion.setPreferredSize(new java.awt.Dimension(90, 20));

        javax.swing.GroupLayout jPanelReparacionDesarrolladorLayout = new javax.swing.GroupLayout(jPanelReparacionDesarrollador);
        jPanelReparacionDesarrollador.setLayout(jPanelReparacionDesarrolladorLayout);
        jPanelReparacionDesarrolladorLayout.setHorizontalGroup(
            jPanelReparacionDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelReparacionDesarrolladorLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanelReparacionDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jLabelReparacionDesarrolladorValorHH, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabelReparacionDesarrolladorHorasReparacion, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanelReparacionDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jTextFieldDesarrolladorValorHH, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jTextFieldDesarrolladorHorasReparacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(36, Short.MAX_VALUE))
        );
        jPanelReparacionDesarrolladorLayout.setVerticalGroup(
            jPanelReparacionDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelReparacionDesarrolladorLayout.createSequentialGroup()
                .addGroup(jPanelReparacionDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelReparacionDesarrolladorValorHH)
                    .addComponent(jTextFieldDesarrolladorValorHH, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanelReparacionDesarrolladorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelReparacionDesarrolladorHorasReparacion)
                    .addComponent(jTextFieldDesarrolladorHorasReparacion, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanelTotalCostoReparacion.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Total Costo Reparación"));
        jPanelTotalCostoReparacion.setMaximumSize(new java.awt.Dimension(222, 77));
        jPanelTotalCostoReparacion.setMinimumSize(new java.awt.Dimension(222, 77));

        jTextFieldTotalCostoReparacionPesos.setEnabled(false);
        jTextFieldTotalCostoReparacionPesos.setMaximumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoReparacionPesos.setMinimumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoReparacionPesos.setPreferredSize(new java.awt.Dimension(90, 20));

        jLabelTotalCostoEvaluacionPesos1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelTotalCostoEvaluacionPesos1.setText("En Pesos ($)");

        jLabelTotalCostoEvaluacionUF1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabelTotalCostoEvaluacionUF1.setText("En UF");

        jTextFieldTotalCostoReparacionUF.setEnabled(false);
        jTextFieldTotalCostoReparacionUF.setMaximumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoReparacionUF.setMinimumSize(new java.awt.Dimension(90, 20));
        jTextFieldTotalCostoReparacionUF.setPreferredSize(new java.awt.Dimension(90, 20));

        javax.swing.GroupLayout jPanelTotalCostoReparacionLayout = new javax.swing.GroupLayout(jPanelTotalCostoReparacion);
        jPanelTotalCostoReparacion.setLayout(jPanelTotalCostoReparacionLayout);
        jPanelTotalCostoReparacionLayout.setHorizontalGroup(
            jPanelTotalCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTotalCostoReparacionLayout.createSequentialGroup()
                .addGap(37, 37, 37)
                .addGroup(jPanelTotalCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTextFieldTotalCostoReparacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTotalCostoEvaluacionPesos1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanelTotalCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTextFieldTotalCostoReparacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTotalCostoEvaluacionUF1, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(40, Short.MAX_VALUE))
        );
        jPanelTotalCostoReparacionLayout.setVerticalGroup(
            jPanelTotalCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelTotalCostoReparacionLayout.createSequentialGroup()
                .addGroup(jPanelTotalCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabelTotalCostoEvaluacionPesos1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabelTotalCostoEvaluacionUF1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanelTotalCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jTextFieldTotalCostoReparacionPesos, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jTextFieldTotalCostoReparacionUF, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanelCostoReparacionLayout = new javax.swing.GroupLayout(jPanelCostoReparacion);
        jPanelCostoReparacion.setLayout(jPanelCostoReparacionLayout);
        jPanelCostoReparacionLayout.setHorizontalGroup(
            jPanelCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCostoReparacionLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelReparacionDesarrollador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelTotalCostoReparacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanelCostoReparacionLayout.setVerticalGroup(
            jPanelCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelCostoReparacionLayout.createSequentialGroup()
                .addGroup(jPanelCostoReparacionLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelTotalCostoReparacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelReparacionDesarrollador, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        jButtonReporte.setText("Generar Reporte");
        jButtonReporte.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonReporteActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanelCostoReparacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelCostoEvaluacion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelFechas, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButtonReporte, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanelFechas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelCostoEvaluacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanelCostoReparacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jButtonReporte)
                .addContainerGap(75, Short.MAX_VALUE))
        );
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonReporteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonReporteActionPerformed
		Document documento = new Document ();

        PanelPaso1 panelPaso1 = vista.getPanelPaso1 ();
        PanelPaso2 panelPaso2 = vista.getPanelPaso2 ();
        ValoresMetodologiaEstimacion vme = new ValoresMetodologiaEstimacion();

        this.setNumeroEvaluadores(panelPaso1.getJTextFieldTotalUsuarios().getText());
        this.setNumeroDesarroll(panelPaso2.getJTextFieldValorNumeroDesarrolladores().getText());
        this.setHorasSoftware(panelPaso1.getJTextFieldHorasTamañoSoftware().getText());
		try {
			PdfWriter.getInstance (documento, new FileOutputStream ("Reporte.pdf"));
			documento.open ();


			PdfPTable t1 = new PdfPTable (2);


			t1.addCell (new Paragraph ("Fecha de Inicio: "));
			t1.addCell (new Paragraph (fechaInicio));

			t1.addCell (new Paragraph ("Fecha de Termino: "));
			t1.addCell (new Paragraph (fechaTermino));

			documento.add (t1);

			documento.add (new Paragraph ("\n\n"));
			PdfPTable t2 = new PdfPTable (2);


			PdfPCell cell =
				new PdfPCell (new Paragraph ("COSTO EVALUACION Y ANALISIS DE LA APLICACIÓN"));
			cell.setColspan (2);
			t2.addCell (cell);

			t2.addCell (new Paragraph ("Valor HH - Evaluador Experto: "));
			t2.addCell (new Paragraph ((String) this.jTextFieldEvaluadorExpertoValorHH.getText ()));

			t2.addCell (new Paragraph ("Horas de Evaluación: "));
			t2.addCell (new Paragraph ((String) this.jTextFieldEvaluadorExpertoHorasEvaluacion.getText ()));

			t2.addCell (new Paragraph ("Valor HH - Usuarios Evaluadores: "));
			t2.addCell (new Paragraph ((String) this.jTextFieldUsuarioEvaluadorValorHH.getText ()));

			t2.addCell (new Paragraph ("Horas de Evaluacion: "));
			t2.addCell (new Paragraph ((String) this.jTextFieldUsuarioEvaluadorHorasEvaluacion.getText ()));

			t2.addCell (new Paragraph ("Otros Costos Involucrados: "));
			t2.addCell (new Paragraph ((String) this.jTextFieldValorOtrosCostos.getText ()));

			t2.addCell (new Paragraph ("Total en UF: "));
			t2.addCell (new Paragraph ((String) this.jTextFieldTotalCostoEvaluacionUF.getText ()));

			t2.addCell (new Paragraph ("Total en pesos: "));
			t2.addCell (new Paragraph ((String) this.jTextFieldTotalCostoEvaluacionPesos.getText ()));


			PdfPCell cell1 = new PdfPCell (new Paragraph ("Detalle: "));
			cell1.setColspan (2);
			t2.addCell (cell1);

			t2.addCell(new Paragraph("Número de Usuarios Evaluadores: "));
            t2.addCell(new Paragraph(numeroEvaluadores));
            t2.addCell(new Paragraph("Tamaño del Software: "));
            t2.addCell(new Paragraph(horasSoftware));
            
			documento.add (t2);
			documento.add (new Paragraph ("\n\n"));

			PdfPTable t3 = new PdfPTable (2);


			cell =
				new PdfPCell (new Paragraph ("COSTO REPARACION: "));
			cell.setColspan (2);
			t3.addCell (cell);


			t3.addCell (new Paragraph ("Valor HH - Desarrollador : "));
			t3.addCell (new Paragraph ((String) this.jTextFieldDesarrolladorValorHH.getText ()));
			t3.addCell (new Paragraph ("Horas de Reparación: "));
			t3.addCell (new Paragraph ((String) this.jTextFieldDesarrolladorHorasReparacion.getText ()));
			t3.addCell (new Paragraph ("Total en UF: "));
			t3.addCell (new Paragraph ((String) this.jTextFieldTotalCostoReparacionUF.getText ()));
			t3.addCell (new Paragraph ("Total en pesos: "));
			t3.addCell (new Paragraph ((String) this.jTextFieldTotalCostoReparacionUF.getText ()));

			PdfPCell cell2 = new PdfPCell (new Paragraph ("Detalle: "));
			cell2.setColspan (2);
			t3.addCell (cell2);

			t3.addCell(new Paragraph("Número de Desarrolladores: "));
            t3.addCell(new Paragraph(numeroDesarroll));
            t3.addCell(new Paragraph("Tamaño del Software: "));

            if(horasSoftware != null && horasSoftware.length() > 0 && Integer.parseInt(horasSoftware)== vme.getHorasPorSoftwarePequeño())
            {
               PdfPCell celld1 = new PdfPCell (new Paragraph ("Software de Tamaño Pequeño"));
                celld1.setColspan (2);
                t3.addCell (celld1);

            }
            else if(horasSoftware != null && horasSoftware.length() > 0 && Integer.parseInt(horasSoftware)== vme.getHorasPorSoftwareMediano())
            {

                PdfPCell celld1 = new PdfPCell (new Paragraph ("Software de Tamaño Medio"));
                celld1.setColspan (2);
                t3.addCell (celld1);
            }
            else if(horasSoftware != null && horasSoftware.length() > 0 && Integer.parseInt(horasSoftware)>= 65)
            {

               PdfPCell celld1 = new PdfPCell (new Paragraph ("Software de Tamaño Grande"));
               celld1.setColspan (2);
               t3.addCell (celld1);
            }
            else
            {

                PdfPCell celld1 = new PdfPCell (new Paragraph ("Tamaño por Determinar"));
                celld1.setColspan (2);
                t3.addCell (celld1);
            }

			documento.add (t3);

            documento.add(new Paragraph("\n\n"));

            PdfPTable t4 = new PdfPTable(2);
			PdfPCell cell3 = new PdfPCell(new Paragraph("OTRAS CONSIDERACIONES: "));
            cell3.setColspan(2);
            t4.addCell(cell3);


            PdfPCell celloc1 = new PdfPCell(new Paragraph(otrasConsideraciones1));
            celloc1.setColspan(2);
            t4.addCell(celloc1);

            if(UCE.equals("")&& UNCE.equals("")&& UEX.equals(""))
            {
                t4.addCell(new Paragraph("No se ha especificado modalidad de usuarios evaluadores"));
            }
            else if(UNCE.equals("")&& UCE.equals(""))
            {
                t4.addCell(new Paragraph("El cliente compromete personal de su empresa como usuarios evaluadores"));
            }
            else if(UCE.equals("")&& UEX.equals(""))
            {
                t4.addCell(new Paragraph("El evaluador experto conseguirá personal de la empresa del cliente como usuarios evaluadores"));
            }
            else if(UCE.equals("")&& UNCE.equals(""))
            {
                t4.addCell(new Paragraph("Se utilizará mano de obra externa como usuarios evaluadores"));
            }
            else if(UEX.equals(""))
            {
                t4.addCell(new Paragraph("Se utilizará una mezcla de usuarios de la empresa del cliente (comprometidos y no comprometidos) como usuarios evaluadores"));
            }
            else if(UNCE.equals(""))
            {
                t4.addCell(new Paragraph("El cliente se compromete con personal de su empresa como usuarios evaluadores, pero también se utilizará mano de obra externa"));
            }
            else if(UCE.equals(""))
            {
                t4.addCell(new Paragraph("Los usuarios evaluadores serán personal de la empresa del cliente y mano de obra externa, pero el cliente no asume responsabilidad en el pago del servicio"));
            }
            else
            {
                 t4.addCell(new Paragraph("No existe esa modalidad de usuarios"));
            }

             documento.add(t4);



		} catch (Exception e) {
			JOptionPane.showMessageDialog (null, "No se pudo generar Reporte.pdf", "Error", JOptionPane.ERROR_MESSAGE);
                        return;
		}

		documento.close ();

		//Abre documento
		try {
			Desktop.getDesktop ().open (new File ("Reporte.pdf"));
		} catch (Exception e) {
			JOptionPane.showMessageDialog (null, "No se pudo abrir Reporte.pdf", "Error", JOptionPane.ERROR_MESSAGE);
                        return;
		}
	}

	public JTextField getJTextFieldDesarrolladorHorasReparacion () {
		return jTextFieldDesarrolladorHorasReparacion;
	}

	public JTextField getJTextFieldDesarrolladorValorHH () {
		return jTextFieldDesarrolladorValorHH;
	}

	public JTextField getJTextFieldEvaluadorExpertoHorasEvaluacion () {
		return jTextFieldEvaluadorExpertoHorasEvaluacion;
	}

	public JTextField getJTextFieldEvaluadorExpertoValorHH () {
		return jTextFieldEvaluadorExpertoValorHH;
	}

	public JTextField getJTextFieldTotalCostoEvaluacionPesos () {
		return jTextFieldTotalCostoEvaluacionPesos;
	}

	public JTextField getJTextFieldTotalCostoEvaluacionUF () {
		return jTextFieldTotalCostoEvaluacionUF;
	}

	public JTextField getJTextFieldTotalCostoReparacionPesos () {
		return jTextFieldTotalCostoReparacionPesos;
	}

	public JTextField getJTextFieldTotalCostoReparacionUF () {
		return jTextFieldTotalCostoReparacionUF;
	}

	public JTextField getJTextFieldUsuarioEvaluadorHorasEvaluacion () {
		return jTextFieldUsuarioEvaluadorHorasEvaluacion;
	}

	public JTextField getJTextFieldUsuarioEvaluadorValorHH () {
		return jTextFieldUsuarioEvaluadorValorHH;
	}

	public JTextField getJTextFieldValorOtrosCostos () {
		return jTextFieldValorOtrosCostos;
    }//GEN-LAST:event_jButtonReporteActionPerformed

	public void setJTextFieldDesarrolladorHorasReparacion (String a) {
		this.jTextFieldDesarrolladorHorasReparacion.setText (a);
	}

	public void setJTextFieldDesarrolladorValorHH (String a) {
		this.jTextFieldDesarrolladorValorHH.setText (a);
	}

	public void setJTextFieldEvaluadorExpertoHorasEvaluacion (String a) {
		this.jTextFieldEvaluadorExpertoHorasEvaluacion.setText (a);
	}

	public void setJTextFieldEvaluadorExpertoValorHH (String a) {
		this.jTextFieldEvaluadorExpertoValorHH.setText (a);
	}

	public void setJTextFieldTotalCostoEvaluacionPesos (String a) {
		this.jTextFieldTotalCostoEvaluacionPesos.setText (a);
	}

	public void setJTextFieldTotalCostoEvaluacionUF (String a) {
		this.jTextFieldTotalCostoEvaluacionUF.setText (a);
	}

	public void setJTextFieldTotalCostoReparacionPesos (String a) {
		this.jTextFieldTotalCostoReparacionPesos.setText (a);
	}

	public void setJTextFieldTotalCostoReparacionUF (String a) {
		this.jTextFieldTotalCostoReparacionUF.setText (a);
	}

	public void setJTextFieldUsuarioEvaluadorHorasEvaluacion (String a) {
		this.jTextFieldUsuarioEvaluadorHorasEvaluacion.setText (a);
	}

	public void setJTextFieldUsuarioEvaluadorValorHH (String a) {
		this.jTextFieldUsuarioEvaluadorValorHH.setText (a);
	}

	public void setJTextFieldValorOtrosCostos (String a) {
		this.jTextFieldValorOtrosCostos.setText (a);
	}

	public void calcularValores () {
		if (planillaLista) {
			PanelPaso1 panelPaso1 = vista.getPanelPaso1 ();
			PanelPaso2 panelPaso2 = vista.getPanelPaso2 ();
			PanelPaso3 panelPaso3 = vista.getPanelPaso3 ();

			float valorUF = panelPaso2.getValorUF ();
			float valorHHEvaluadorExperto = Float.parseFloat (panelPaso3.getJTextFieldEvaluadorExpertoValorHHUF ().getText ());
			int horasTamañoSoftware = Integer.parseInt (panelPaso1.getJTextFieldHorasTamañoSoftware ().getText ());
			int horasUsuariosEvaluadores = Integer.parseInt (panelPaso1.getJTextFieldHorasUsuariosEvaluadores ().getText ());
			int horasLugarEvaluacion = Integer.parseInt (panelPaso1.getJTextFieldHorasLugarEvaluacion ().getText ());
			int horasEvaluadorExperto = horasTamañoSoftware + horasUsuariosEvaluadores + horasLugarEvaluacion;

			float valorHHUsuarioEvaluador = Float.parseFloat (panelPaso3.getJTextFieldUsuarioEvaluadorValorHHUF ().getText ());
			int horasUsuarioEvaluador = Integer.parseInt (panelPaso1.getJTextFieldHorasUsuariosEvaluadores ().getText ());

			float valorOtrosCostos = Float.parseFloat (panelPaso2.getJTextFieldGastosTotalUF ().getText ());

			float factorTiempoentrega = Float.parseFloat (panelPaso1.getJTextFieldFactorTiempoEntrega ().getText ());

			int totalUsuarios = Integer.parseInt (panelPaso1.getJTextFieldTotalUsuarios ().getText ());

			float totalCostoEvaluacion = (valorHHEvaluadorExperto * horasEvaluadorExperto + (valorHHUsuarioEvaluador * horasUsuarioEvaluador) * totalUsuarios) * factorTiempoentrega + valorOtrosCostos;

			jTextFieldEvaluadorExpertoValorHH.setText ((String.valueOf (ValidaDecimal.roundNum (valorHHEvaluadorExperto))));
			jTextFieldEvaluadorExpertoHorasEvaluacion.setText ((String.valueOf (horasEvaluadorExperto)));
			jTextFieldUsuarioEvaluadorValorHH.setText ((String.valueOf (ValidaDecimal.roundNum (valorHHUsuarioEvaluador))));
			jTextFieldUsuarioEvaluadorHorasEvaluacion.setText ((String.valueOf (horasUsuarioEvaluador)));
			jTextFieldValorOtrosCostos.setText ((String.valueOf (ValidaDecimal.roundNum (valorOtrosCostos))));
			jTextFieldTotalCostoEvaluacionUF.setText ((String.valueOf (ValidaDecimal.roundNum (totalCostoEvaluacion))));
			jTextFieldTotalCostoEvaluacionPesos.setText ((String.valueOf ((int) (totalCostoEvaluacion * valorUF))));

			float valorHHDesarrollador = Float.parseFloat (panelPaso2.getJTextFieldValorHHDesarrolladorUF ().getText ());
			int horasReparacionDesarrollador = Integer.parseInt (panelPaso2.getJTextFieldHorasReparacion ().getText ());
			int numeroDesarrolladores = Integer.parseInt (panelPaso2.getJTextFieldValorNumeroDesarrolladores ().getText ());
			float totalCostoReparacion = valorHHDesarrollador * horasReparacionDesarrollador * numeroDesarrolladores;

			jTextFieldDesarrolladorValorHH.setText ((String.valueOf (ValidaDecimal.roundNum (valorHHDesarrollador))));
			jTextFieldDesarrolladorHorasReparacion.setText ((String.valueOf (horasReparacionDesarrollador)));
			jTextFieldTotalCostoReparacionUF.setText ((String.valueOf (ValidaDecimal.roundNum (totalCostoReparacion))));
			jTextFieldTotalCostoReparacionPesos.setText ((String.valueOf ((int) (totalCostoReparacion * valorUF))));

            if (panelPaso1.getjRadioButtonLugarEmpresa().isSelected())
            {
                this.setOtrasConsideraciones1("Cliente se responsabiliza por Lugar para la Evaluación\n");
            }
            else if (panelPaso1.getjRadioButtonLugarArrendado().isSelected())
            {
                this.setOtrasConsideraciones1("Evaluador Experto se responsabiliza por Lugar para la Evaluación\n");
            }
            else
            {
                this.setOtrasConsideraciones1("No se ha especificado responsabilidad por Lugar para la Evaluación\n");
            }

            this.setUCE(panelPaso1.getJTextFieldUCE().getText());
            this.setUNCE(panelPaso1.getJTextFieldUNCE().getText());
            this.setUEX(panelPaso1.getJTextFieldUEX().getText());

		}
	}

	public void mostrarPaneles () {
		jPanelCostoEvaluacion.setVisible (planillaLista);
		jPanelCostoReparacion.setVisible (planillaLista);
	}

	public void setPlanillaLista (boolean valor) {
		planillaLista = valor;
	}

    private void jCalendarComboFechaInicioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCalendarComboFechaInicioActionPerformed
		fechaInicio = (String) jCalendarComboFechaInicio.getSelectedItem ();
    }//GEN-LAST:event_jCalendarComboFechaInicioActionPerformed

    private void jCalendarComboFechaTerminoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCalendarComboFechaTerminoActionPerformed
		fechaTermino = (String) jCalendarComboFechaTermino.getSelectedItem ();
    }//GEN-LAST:event_jCalendarComboFechaTerminoActionPerformed

     public String getUCE() {
        return UCE;
    }

    public void setUCE(String UCE) {
        this.UCE = UCE;
    }

    public String getUNCE() {
        return UNCE;
    }

    public void setUNCE(String UNCE) {
        this.UNCE = UNCE;
    }

    public String getHorasSoftware() {
        return horasSoftware;
    }

    public void setHorasSoftware(String horasSoftware) {
        this.horasSoftware = horasSoftware;
    }


    public String getNumeroEvaluadores() {
        return numeroEvaluadores;
    }

    public void setNumeroEvaluadores(String numeroEvaluadores) {
        this.numeroEvaluadores = numeroEvaluadores;
    }

    public String getOtrasConsideraciones1() {
        return otrasConsideraciones1;
    }

    public void setOtrasConsideraciones1(String otrasConsideraciones1) {
        this.otrasConsideraciones1 = otrasConsideraciones1;
    }

    public String getTamSoftware() {
        return tamSoftware;
    }

    public void setTamSoftware(String tamSoftware) {
        this.tamSoftware = tamSoftware;
    }
	private void jButtonMostrarCamposActionPerformed (java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonMostrarCamposActionPerformed
		if ((vista.getJProgressBarPaso1 ().getValue () == vista.getJProgressBarPaso1 ().getMaximum ()) &&
			(vista.getJProgressBarPaso2 ().getValue () == vista.getJProgressBarPaso2 ().getMaximum ()) &&
			(vista.getJProgressBarPaso3 ().getValue () == vista.getJProgressBarPaso3 ().getMaximum ())) {
			planillaLista = true;
			calcularValores ();
			mostrarPaneles ();
		} else {
			TimingUtils.showTimedBalloon (new BalloonTip (jButtonMostrarCampos, "Faltan campos por llenar en los otros pasos",
				new MinimalBalloonStyle (new Color (231, 225, 165), 2), BalloonTip.Orientation.LEFT_ABOVE,
				BalloonTip.AttachLocation.ALIGNED, 20, 10, false), 3000);
		}
	}//GEN-LAST:event_jButtonMostrarCamposActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButtonMostrarCampos;
    private javax.swing.JButton jButtonReporte;
    private org.freixas.jcalendar.JCalendarCombo jCalendarComboFechaInicio;
    private org.freixas.jcalendar.JCalendarCombo jCalendarComboFechaTermino;
    private javax.swing.JLabel jLabelEvaluadorExpertoHorasEvaluacion;
    private javax.swing.JLabel jLabelEvaluadorExpertoValorHH;
    private javax.swing.JLabel jLabelFechaInicio;
    private javax.swing.JLabel jLabelFechaTermino;
    private javax.swing.JLabel jLabelReparacionDesarrolladorHorasReparacion;
    private javax.swing.JLabel jLabelReparacionDesarrolladorValorHH;
    private javax.swing.JLabel jLabelTotalCostoEvaluacionPesos;
    private javax.swing.JLabel jLabelTotalCostoEvaluacionPesos1;
    private javax.swing.JLabel jLabelTotalCostoEvaluacionUF;
    private javax.swing.JLabel jLabelTotalCostoEvaluacionUF1;
    private javax.swing.JLabel jLabelUsuarioEvaluadorHorasEvaluacion;
    private javax.swing.JLabel jLabelUsuarioEvaluadorValorHH;
    private javax.swing.JLabel jLabelValorOtrosCostos;
    private javax.swing.JPanel jPanelCostoEvaluacion;
    private javax.swing.JPanel jPanelCostoReparacion;
    private javax.swing.JPanel jPanelEvaluadorExperto;
    private javax.swing.JPanel jPanelFechas;
    private javax.swing.JPanel jPanelOtrosCostos;
    private javax.swing.JPanel jPanelReparacionDesarrollador;
    private javax.swing.JPanel jPanelTotalCostoEvaluacion;
    private javax.swing.JPanel jPanelTotalCostoReparacion;
    private javax.swing.JPanel jPanelUsuarioEvaluador;
    private javax.swing.JTextField jTextFieldDesarrolladorHorasReparacion;
    private javax.swing.JTextField jTextFieldDesarrolladorValorHH;
    private javax.swing.JTextField jTextFieldEvaluadorExpertoHorasEvaluacion;
    private javax.swing.JTextField jTextFieldEvaluadorExpertoValorHH;
    private javax.swing.JTextField jTextFieldTotalCostoEvaluacionPesos;
    private javax.swing.JTextField jTextFieldTotalCostoEvaluacionUF;
    private javax.swing.JTextField jTextFieldTotalCostoReparacionPesos;
    private javax.swing.JTextField jTextFieldTotalCostoReparacionUF;
    private javax.swing.JTextField jTextFieldUsuarioEvaluadorHorasEvaluacion;
    private javax.swing.JTextField jTextFieldUsuarioEvaluadorValorHH;
    private javax.swing.JTextField jTextFieldValorOtrosCostos;
    // End of variables declaration//GEN-END:variables

    /**
     * @return the numeroDesarroll
     */
    public String getNumeroDesarroll() {
        return numeroDesarroll;
    }

    /**
     * @param numeroDesarroll the numeroDesarroll to set
     */
    public void setNumeroDesarroll(String numeroDesarroll) {
        this.numeroDesarroll = numeroDesarroll;
    }

    /**
     * @return the UEX
     */
    public String getUEX() {
        return UEX;
    }

    /**
     * @param UEX the UEX to set
     */
    public void setUEX(String UEX) {
        this.UEX = UEX;
    }
}
